package com.zy.dp.state.example3;

public class SpiteVoteState implements VoteState
{

	@Override
	public void vote(String user, String voteItemString, VoteManager voteManager)
	{

		String s = voteManager.getMapVote().get(user);
		if (s != null)
		{
			voteManager.getMapVote().remove(user);
		}

		System.out.println("你有恶意刷票行为，取消投票资格");

		if (voteManager.getMapVoteCount().get(user) >= 7)
		{
			voteManager.getMapState().put(user, new BlackVoteState());
		}

	}

}
